package cn.wolfcode.feign;

import cn.wolfcode.common.web.Result;
import cn.wolfcode.domain.PayVo;
import cn.wolfcode.domain.RefundResult;
import cn.wolfcode.domain.RefundVo;
import cn.wolfcode.feign.fallback.PayFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "pay-service",fallback = PayFeignFallback.class)
public interface PayFeignApi {

    //支付宝支付
    @PostMapping("/alipay/prepay")
    Result<String> prepay(@RequestBody PayVo payVo);

    //支付宝退款
    @PostMapping("/alipay/refund")
    Result<Boolean> refund(@RequestBody RefundVo refundVo);


}